package server;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;

/**
 * <p>
 *
 * </p>
 *
 * @author KK
 * @since 2021-09-05
 */
public class ClassLoadTest {


    public static void main(String[] args) throws Exception {
        URL url = new URL("file:///Users/zk/Documents/project/zk/javat/java-phase-2-module-1/code/demo1/target/classes/");
        String clazzPath = "kk.learn.java.tomcat.demo1.Demo1Servlet";
        URLClassLoader classLoader = new URLClassLoader(new URL[]{url});
        Class<?> aClass = classLoader.loadClass(clazzPath);
        System.out.println(aClass);


    }

}
